<?php
class Noticias extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
        //cargamos la libreria tabla con paginacion
        $tabla = $this->load->library('table_lib');
        $this->load->helper('url');
    }
     
    public function index()
    {
        $array_head = array('ID', 'TITULO', 'CONTENIDO','CUARTA COLUMNA', 'Revisar', 'Revisar 2');
        $list_fields = array('id','title','slug','text');
        $link_fields = array(
                     "0"=>array('class/method/','id','Revisar'),//class method, campo tabla, Link
                     "1"=>array('class/method1/','text',"<img src=\"".base_url()."/img/detalle.png\" title=\"Detalle\"/>")
                     );

        //($model, $get, $total_row, $base_url, $prefix, $per_page, $array_head, $list_fields, $link_fields, $ancho_tabla)
        $data=$this->table_lib->crear_tabla('noticias_model', 'get_noticias', 'total_filas', 'index.php/noticias/', '/page/', 4,
        $array_head, $list_fields, $link_fields, '100%');

        $this->load->view('paginacion/index_view.php',$data);

  }

}